package com.zhaoyue.study.jdk;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.ReentrantLock;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 2017/2/28
 * Time: 14:35
 * To change this template use File | Settings | File Templates.
 */
public class Test implements Cloneable{

    private String name ;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public void init(){
        StringBuilder sb = new StringBuilder("ab");
        change(sb);
        System.out.println(sb.toString());
    }

    private void change(StringBuilder sb){
        sb.delete(0,2).append("cd");
    }

    public static void main(String[] args) throws Exception {
        Test test = new Test();
        test.setName("赵越");

        Test a = (Test) test.clone();



        //(默认情况下 对象的 == 和 equals 一样)
        System.out.println(a == test);
        System.out.println(a.equals(test));

        System.out.println(test.hashCode());
        System.out.println(a.hashCode());


        System.out.println("取于数");
        System.out.println(12345 % 8);
        System.out.println(12346 % 8);
        System.out.println(12349 % 8);


        Test test1 = new Test();
        test1.init();


        System.out.println((3*7));
        System.out.println((3 << 3) - 3);

        Map<String,String> map = new ConcurrentHashMap<>(12);
        map.size();
        map.isEmpty();

        int size = 5;
        System.out.println((size<<=1));


        ArrayBlockingQueue arrayBlockingQueue = null;
        arrayBlockingQueue.put("");
        arrayBlockingQueue.take();


        HashSet<String> str = new HashSet<String>();
        str.add("1");







    }
}
